package some.member.profil.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Component;

import some.member.profil.domain.IdealMemberCommand;

@Component
public class IdealMemberDaoImpl extends SqlSessionDaoSupport implements IdealMemberDao{
	
	@Override
	public void idealInsertMember(IdealMemberCommand idealCommand) {
		getSqlSession().insert("someIdealDao.idealInsertMember",idealCommand);
	}	
	
	
	@Override
	public List<IdealMemberCommand> getMemberList(Map<String, Object> map) {
		List<IdealMemberCommand> list = getSqlSession().selectList("someIdealDao.getMemberList",map);
		return list;
	}

	@Override
	public int getMemberCount() {
		Integer count = getSqlSession().selectOne("someIdealDao.getMemberCount");
		return count;
	}

	@Override
	public IdealMemberCommand getIdealMember(String id) {
		IdealMemberCommand idealCommand = getSqlSession().selectOne("someIdealDao.getIdealMember",id);
		return idealCommand;
	}

	@Override
	public void modifyIdeal(IdealMemberCommand idealCommand) {
		getSqlSession().update("someIdealDao.modifyIdeal",idealCommand);
	}

	@Override
	public void deleteIdeal(String id) {
		getSqlSession().delete("someIdealDao.deleteIdeal",id);
		
	}
}
